{include admin.inc.header}

{include admin.inc.top}

<div class="container-fluid content-body">
    <div class="main">
        {include admin.inc.menu}

        <section class="right-section" id="right-section">
            <!-- start of inner-frame -->
            <div class="inner-iframe">

                <ul class="breadcrumb">
                    <li>
                        <i class="glyphicon glyphicon-home"></i>
                        <span>当前位置：</span>
                        <a href="#">{$breadcrumb[0]}</a>
                        <i class="glyphicon glyphicon-chevron-right"></i>
                        <a href="#">{$breadcrumb[1]}</a>
                    </li>
                </ul>

                <!-- Nav tabs -->
                <!-- Nav tabs -->
                <ul class="nav nav-tabs">
                    <li class="active"><a href=""><i class="glyphicon glyphicon-th-list"></i> 销售明细</a></li>
                </ul>

                <div class="inner-container">
                    <form class="form-inline form-search" role="form" id="search-form">
                        <input type="hidden" name="pagesize" value="{$pagesize}" >
                        <div class="form-group">
                            <select name="select_mix_option1" id="select-mix-option1" class="form-control input-sm">
                                <option value="order_no">订单号</option>
                                <option value="product_no">货号</option>

                            </select>
                        </div>
                        <!-- searchinput -->
                        <div class="form-group">
                            <div class="input-group">

                                <input type="text" class="form-control input-sm" maxlength="{maxlength}" placeholder="关键词" name="select_mix_option_value1" value="{$search_arr[select_mix_option_value1]}">
                            </div>
                        </div>
                        <div class="form-group">
                            <select name="appid"  class="form-control input-sm">
                                <option value="">租户标识</option>
                                {loop $app_idoptions $v}
                                <option value="{$v[id]}">{$v[company]}</option>
                                {/loop}

                            </select>
                        </div>
                        <div class="form-group">
                            <div class="input-group">
                                <div class="input-group-addon">
                                    销售时间
                                </div>
                                <input style="width:100px;" class="form-control form-control-inline input-sm mdate"  size="16" type="text"
                                       name="start_time" value="{$search_arr[start_time]}"
                                       placeholder="开始时间" />

                                <div class="input-group-addon">
                                    -
                                </div>
                                <input style="width:100px;" class="form-control form-control-inline input-sm mdate"  size="16" type="text"
                                       name="end_time" value="{$search_arr[end_time]}"
                                       placeholder="结束时间" />
                            </div>
                        </div>


                        <script>
                            var select_mix_option1="{$search_arr[select_mix_option1]}";

                            if(select_mix_option1){$("select[name='select_mix_option1']").val(select_mix_option1);}

                            var appid="{$search_arr[appid]}";

                            if(appid){$("select[name='appid']").val(appid);}

                        </script>

                        <button type="submit" class="btn btn-sm btn-success">搜索</button>
                        {data_export_btn}

                        <!-- search form end -->
                    </form>

                    <form id="J_List_Form" autocomplete="off">

                        <div class="table-responsive" style="overflow-x: visible;">
                            <table class="table table-bordered table-hover" id="J_List_Table">
                                <!--tmpl-listtable-->

                                <!-- listblock -->
                                <thead>
                                <tr>
                                    <th width="20"><input type="checkbox" class="icheck check-all" /></th>
                                    {loop $tableHeader $val}
                                    <th>{$val}</th>
                                    {/loop}
                                </tr>
                                </thead>
                                <tbody>
                                {if empty($items)}
                                <tr>
                                    <td class="no-records text-center">{$noRecords}</td>
                                </tr>
                                {/if}
                                {loop $items $value}
                                <tr>
                                    <td><input type="checkbox" class="icheck" name="ids[]" value="{$value[id]}"/></td>
                                    <!--tmpl-fieldlist-->
                                    <td>{$value[order_no]}</td>
                                    <td>{$value[company_name]}</td>
                                    <td>{$value[pay_way]}</td>
                                    <td>{$value[product_no]}</td>
                                    <td>{$value[type_name]}</td>
                                    <td>{$value[product_name]}</td>
                                    <td>{$value[factory_name]}</td>
                                    <td>{$value[brand_name]}</td>
                                    <td>{$value[pkg_size]}</td>
                                    <td>{$value[sale_quantity]}</td>
                                    <td>{$value[sale_amount]}</td>
                                    <td>{$value[sale_profit]}</td>
                                    <td>{$value[order_time]}</td>

                                </tr>
                                {/loop}


                            </table>

                        </div>
                    </form>

                    <div class="text-right">
                        {$pagemenu}
                    </div>

                </div>

            </div><!-- end of inner -->
        </section>

    </div>
</div>

{include admin.inc.footer}

<script>
    seajs.use("common", function (exports) {
        exports.init();
    });
</script>
</body>
</html>
